package com.xln.util;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.ToString;

import java.io.Serializable;

@Getter
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@AllArgsConstructor
@ToString
public enum ResEnum implements Serializable {




    SUCCESS(200, "操作成功"),
    ERROR(500, "操作失败"),

    LOGIN_SUCCESS(200, "登录成功"),

    LOGIN_ERROR(400, "用户未登录"),
    USER_NOT_EXIST(401, "用户不存在"),
    PASSWORD_ERROR(402, "密码错误"),

    DELETE_SUCCESS(200, "删除成功"),
    DELETE_ERROR(500, "删除失败"),

    FILE_SUCCESS(200, "文件上传成功"),
    FILE_NULL(400, "文件为空"),
    FILE_FORMAT_ERROR(400, "只允许上传图片文件"),
    FILE_SIZE_ERROR(400, "文件大小不能超过5MB"),
    FILE_UPLOAD_ERROR(500, "文件上传失败");


    private final Integer code;
    private final String message;
}
